﻿using Com.FastSearch.SharePoint.Interfaces;
using Microsoft.SharePoint.Administration;

namespace Com.FastSearch.SharePoint.BL.SearchManager
{
    /// <summary>
    /// Implementation of <see cref="IESPSearchManagerFactory"/>, that
    /// produces implementations of <see cref="IESPSearchManager"/> using
    /// <see cref="ESPSearchManager"/>.
    /// </summary>
    public class ESPSearchManagerFactory: IESPSearchManagerFactory
    {
        /// <inheritdoc/>
        public IESPSearchManager Create(SPWebApplication app)
        {
            return ESPSearchManager.GetInstance(app);
        }

        /// <inheritdoc/>
        public IESPSearchManager Create(string connection)
        {
            return ESPSearchManager.GetInstance(connection);
        }
    }
}
